package com.ctosb.classviewer.clazz.cp;

import com.ctosb.classviewer.ClassReader;
import com.ctosb.classviewer.clazz.AbstractParse;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 常量池基类
 */
@Data
@Accessors(chain = true)
public abstract class Cp_info extends AbstractParse {

    private byte tag;

    /**
     * 解析cp_info
     *
     * @param classReader
     * @return
     */
    @Override
    public Cp_info parse(ClassReader classReader) {
        doParse(classReader);
        return this;
    }

    protected abstract void doParse(ClassReader classReader);

}
